package com.menu.Mapper;

import com.menu.Pojo.Menu;
import com.menu.Pojo.MenuFather;

import java.util.List;

public interface MenuFatherMapper {
    /**
     * 通过菜单id查找菜单
     * @param menuFatherId
     * @return
     */
    MenuFather findByMenuFatherId(Integer menuFatherId);

    /**
     * 遍历所有的菜单
     * @return
     */
    List<MenuFather> findAllMenuFather();

    /**
     * 查找最近x天的菜单
     * @return
     */
    List<MenuFather> findAllNearTimeMenuFather(Integer day);

    /**
     * 添加菜单
     * @param menuFather
     * @return
     */
    Integer addMenuFather(MenuFather menuFather);

    /**
     * 删除菜单
     * @param menuFatherId
     * @return
     */
    Integer deleteMenuFather(Integer menuFatherId);

    /**
     * 批量删除
     * @param menuFatherId
     * @return
     */
    Integer batchDeleteMenuFather(Integer[]menuFatherId);

    /**
     * 修改菜单
     * @return
     */
    Integer updateMenuFatherSrc(String menuFatherSrc,Integer menuFatherId);

    /**
     * 查找用户创建的菜单
     * @param userId
     * @return
     */
    List<MenuFather> findMenuFatherByUserId(Integer userId);

    /**
     * 查找所有的菜单
     */
    List<MenuFather> findMenuFather();

    /**
     * 根据名字查询-带分页
     * @param menuFatherName
     * @return
     */
    List<MenuFather> findByMenuFatherNameLike(String menuFatherName);

    /**
     * 遍历最热菜单
     * @return
     */
    List<MenuFather> findByMenuFatherByDoh();

    /**
     * 审核菜单通过
     * @param menuFatherId
     * @return
     */
    Integer updateStateToOne(Integer menuFatherId);

    /**
     * 审核菜单未通过
     * @param menuFatherId
     * @return
     */
    Integer updateStateToZero(Integer menuFatherId);

    /**
     * 后台搜索
     * @param menuFatherName
     * @return
     */
    List<MenuFather> adminFindByMenuFatherNameLike(String menuFatherName);


    Integer updateMenuIds(Integer menuFatherId,String menuIds);


}


